<template>
  <div>
    <header class="mui-bar mui-bar-nav">
      <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
      <h1 class="mui-title">{{title}}</h1>
    </header>
  </div>
</template>

<script>
  export default {
    name: "",
    data() {
      return {}
    },
    methods: {
      goBack() {/*编程导航,返回上一页*/
        this.$router.go(-1);
      },
    },
    computed: {
      title: function () {
        let pageName = this.$route.name;
        switch (pageName) {
          case 'index':
            return '\"啡尝\"时光';
            break;
          case 'search':
            return '搜索';
            break;
          case 'shopCar':
            return '购物车';
            break;
          case 'userInfo':
            return '我的';
            break;
          default:
            return '\"啡尝\"时光';
            break;
        }
      }
    }
  }
</script>

<style scoped>
</style>
